1. Field of the Invention
The present invention relates to a method and apparatus for creating and recording time information for searching digital data streams to be recorded on a recording medium and a method and apparatus for searching for requested data using the created time information.
2. Description of the Related Art
In the conventional analog television broadcast, video signals are transmitted over the air or through cables after being AM or FM modulated. With the recent advance of digital technologies such as digital image compression or digital modulation/demodulation, standardization for digital television broadcast is in rapid progress. Based upon the Moving Picture Experts Group (MPEG) format, satellite and cable broadcast industry also moves towards the digital broadcast.
The digital broadcast offers several advantages that its analog counterpart cannot provide. For example, the digital broadcast is capable of providing services with far more improved video/audio quality, transmitting several different programs within a fixed bandwidth, and offering enhanced compatibility with digital communication media or digital storage media.
In the digital broadcast, a plurality of programs encoded based upon the MPEG format are multiplexed into a single transport stream before transmitted. The transmitted transport stream is received by a set top box at the receiver and demultiplexed into original programs. If a program is chosen from among the demultiplexed programs, the chosen program is decoded by a decoder in the set top box and original audio and video signals are retrieved. The retrieved audio and video signals can be presented by an A/V output apparatus such as a TV.
It is also possible to record the received digital broadcast signals on a storage medium instead of directly outputting the received broadcast signals to A/V output devices. The stored digital broadcast signals can be edited and retrieved afterwards. For example, a digital data stream received by the set top box can be transmitted to a streamer such as a digital video disk (DVD) recording apparatus through communication interfaces like an IEEE-1394 serial bus and stored on a recording medium by the streamer. The recorded digital data stream can be edited and transmitted back to the set top box so that the digital audio and video data can be presented.
When recording the digital data stream of a single program on a recording medium in a streamer, the basic recording unit is a stream object (SOB) comprising a series of stream object units (SOBUs). To record received digital data streams on a recording medium and to reproduce the recorded data afterwards, it is necessary to explore how to group and record stream objects (SOBs) and stream object units (SOBUs) and how to create search information for managing and searching for the recorded stream objects (SOBS) and stream object units (SOBUs). Also, it is required to investigate how to search a specific data stream corresponding to a search time requested by a user.
A conventional method for recording digital data streams and creating and recording navigation information will now be explained with reference to the accompanying drawings.
FIG. 1 depicts a block diagram of an apparatus in which the conventional method for creating and recording the navigation information for recorded digital data streams can be employed. FIG. 2 depicts the process of recording digital data streams and creating the navigation information in the system shown in FIG. 1. The system comprises a set top box 100, a communication interface (IEEE-1394), and a streamer 200. The set top box 100 receives transport streams encoded by system encoders and broadcast by a plurality of broadcast stations and demultiplexes the received transport streams. After a decoder 120 decodes the transport stream of a program tuned by a tuning unit 110, a control unit 140 outputs the decoded transport stream to an A/V output apparatus or to the streamer 200 through the IEEE-1394 communication interface 130 and 210 so that the transmitted program can be recorded on a recording medium 230 by the streamer 200, depending upon a user's choice. When requested by a user, the streamer 200 retrieves the recorded program and transmits the retrieved program through the IEEE-1394 communication interface back to the set top box 100. In the set top box 100, the received program is decoded by the decoder 120 and then outputted to an A/V output apparatus so that the recorded program can be presented.
A control unit 250 of the streamer 200 controls a stream recording unit 220 to record the data stream transmitted from the set top box 100 on the recording medium 230, as shown in FIG. 2. The received data stream composed of transport stream packets is recorded on the recording medium along with the packet arrival time (PAT) of each transport stream packet. The transport stream packets with packet arrival times are organized in sectors on the recording medium, with each sector having a predetermined size. A predetermined number of sectors, for example 32 sectors, are grouped into a stream object unit (SOBU). If the recording process is stopped or suspended by a user, the recorded stream object units (SOBUs) are grouped into a stream object (SOB). Additionally, navigation data such as the stream start application packet arrival time (S_S_APAT) and incremental application packet arrival time (IAPAT) for managing and searching for the stream object (SOB) and stream object units (SOBUs) is recorded together with the transport stream packets on the recording medium.
FIG. 3 shows the way the received digital data stream is recorded on the recording medium 230. An application packet and its packet arrival time (PAT or time stamp) constitute a transport stream packet (TSP). A plurality of transport stream packets (TSPs) and header information are organized into a sector and a predetermined number of sectors, for example 32 sectors, constitute a stream object unit (SOBU). A series of stream object units (SOBUs) constitutes a stream object (SOB). Meanwhile, the stream object information (SOBI), which is the navigation data for managing and searching the recorded stream object (SOB), comprises stream object general information (SOB_GI) and a mapping list (MAPL) for managing stream object units (SOBUs) contained in the stream object (SOB), as shown in FIGS. 4 and 5. The stream object general information (SOB_GI) includes the stream start application packet arrival time (S_S_APAT) indicative of the start time of the associated stream object (SOB). As shown in FIG. 2, the incremental application packet arrival time (IAPAT), which is a count value counted at constant time intervals (x) between two consecutive stream object units (SOBUs), is included in the mapping list (MAPL) and used as information for searching for the associated stream object units (SOBUs).
The stream start application packet arrival time (S_S_APAT) contained in the stream object general information (SOB_GI) is recorded as a 6-byte packet arrival time (PAT) comprising a 9-bit packet arrival time extension (PAT_ext) and a 39-bit packet arrival time base (PAT_base), as shown in FIG. 6(a). The packet arrival time extension (PAT_ext) is a modulo-300 counter that is incremented at a rate of 27 MHz, whereas the packet arrival time base (PAT_base) is incremented at a rate of 90 kHz. Unlike the stream start application packet arrival time (S_S_APAT), the time stamp recorded along with the application packet shown in FIG. 3 is recorded as a 4-byte packet arrival time (PAT) as shown in FIG. 6(b) that is incremented at a rate of 27 MHz and thus can represent from 0 s up to 159 s (=232/27 MHz). As discussed above, the PAT of the transport stream packet as shown in FIG. 6(b) is a time stamp recorded along with an application packet, and is part of a SOB as shown in FIG. 3 where the SOB is part of user data (actual presentation data) recorded on the recording medium 230.
The method for searching for a transport stream packet corresponding to requested search time using the navigation and time information regarding the stream object (SOB), stream object units (SOBUs) will be explained in detail with reference to an example.
Suppose that the position (s) of a transport stream packet corresponding to the search time (ST) requested by a user is to be searched for, as shown in FIG. 2. First, the stream start application packet arrival time (S_S_APAT) contained in the stream object general information (SOB_GI) of each stream object (SOB) is compared with the requested search time (ST) and a stream start application packet arrival time (S_S_APAT) that is closest to but does not exceed the request search time (ST) is detected. Referring to the mapping list (MAPL) of the stream object SOB #1 containing the detected stream start application packet arrival time (S_S_APAT), the incremental application packet arrival time (IAPAT 1˜4) contained in the mapping list (MAPL) are summed up. The sum value is multiplied by the unit time (x) and added to the detected stream start application packet arrival time (S13 S_APAT). The procedure is repeated until the calculated value (S_S_APAT+x×ΣIAPAT) approaches the requested search time (ST) without exceeding it. In FIG. 2, the summation and multiplication is repeated to include IAPAT 4 because the calculated value exceeds the search time (ST) if the calculation continues to IAPAT5. Then, the entry in the mapping list (MAPL) corresponding to the calculated time (S_S_APAT+x×ΣIAPAT) is located and the index of the entry is multiplied by the number of sectors constituting a stream object unit (for example, 32 sectors) to locate the desired stream object unit SOBU 5.
From the start position A′ of the searched stream object SOBU 5, the 4-byte packet arrival time (PAT), which is the time stamp of the transport stream packet, is detected. Recall that the stream start application packet arrival time (S_S_APAT) and the packet arrival time (PAT) of a transport stream packet have different formats and therefore the two values cannot be directly compared. For this reason, the difference between the detected packet arrival time (PAT) and the packet arrival time of the first transport stream packet of the stream object unit SOBU 5 is compared with the difference between the requested search time (ST) and the calculated value (S_S_APAT+x×ΣIAPAT) for fine search of the transport stream packet corresponding to the requested search time (ST).
The position A searched based upon the time information (S_S_APAT+x×ΣIAPAT) calculated using the incremental application packet arrival times (IAPATs), however, does not coincide with the actual start position A′ of the stream object unit SOBU 5, as shown in FIG. 2. Therefore, the offset between the transport stream packet position A detected by the fine search operation and the actual position A′ results in a delay in the search operation.
As a result, additional information indicative of the offset value between A′ and A (Offset_SZ in FIG. 2) is necessary for precisely searching for the position (s) of the transport stream packet corresponding to the requested search time (ST). It is not desirable, however, to add the additional information to every stream object unit (SOBU), which dramatically lowers the recording efficiency of the recording medium.